package animation.sort.algorithms.monitoring;

import animation.core.AlgorithmMonitorModel;
import animation.core.AlgorithmAnimation;
import animation.core.Monitoreable;

/**
 * Created by IntelliJ IDEA.
 * User: Pablo
 * Date: Aug 9, 2008
 * Time: 4:55:32 AM
 * To change this template use File | Settings | File Templates.
 */
public class MonitorModelFactory {

    public static AlgorithmMonitorModel createModel(AlgorithmAnimation animation){
        AlgorithmMonitorModel model = null;
        
        if (animation.supportsMonitoring()){
            model = ((Monitoreable)animation).buildMonitorModel();
        }

        return model;
    }
}
